Skip to content

Integrate Probabilit - #749

Merged
dafeda merged 1 commit into
equinor:mainfrom
tommyod:probabilit
Oct 10, 2025
Merged

Integrate Probabilit#749
dafeda merged 1 commit into
equinor:mainfrom
tommyod:probabilit

Conversation

@tommyod

@tommyod tommyod commented Sep 8, 2025

Copy link
Copy Markdown
Contributor
  • Use probabilit for random variable generation
  • Add option 'correlation_iterations' in general input sheet (default=0 => ImanConover)
  • Since variable sampling is not done in the same order, RNG is different and snapshot had to be used
  • Slight discrepancies in Mac and Linux RNG. Fixed by letting snapshot compare 6 siginificant digits
  • Added a test file with 6 lognorms, that showcases how we get better correlation matrices if correlation_iterations > 0
  • Deleted ImanConover, nearest_correlation_matrix, etc. These are all in probabilit

Removes around 400 lines of code in total. Removes all LHS, ImanConover, etc responsibility from fmudesign - focusing it back on being a CLI tool that "glues" functionality together instead of implmeneting scientific routines. Improve correlation matrices (defaults to ImanConover though)

@tommyod
tommyod force-pushed the probabilit branch 2 times, most recently from 30f1aa3 to 593f747 Compare October 8, 2025 09:57
@tommyod
tommyod marked this pull request as ready for review October 8, 2025 10:04
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
if correlation_iterations > 0:
correlator = probabilit.correlation.Composite(
iterations=correlation_iterations,
correlation_type="pearson",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should users be able to set the correlation type?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think most users care about pearson. But i will add a little comment in the code. Perhaps we should ask users if this is of interest. Personally I think it might not be that important to them, but who knows!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this as Iman-Conover uses spearman. Let's have a chat.

Comment thread src/semeio/fmudesign/design_distributions.py Outdated
Comment thread src/semeio/fmudesign/design_distributions.py
@tommyod
tommyod force-pushed the probabilit branch 2 times, most recently from 87ce82b to 45503aa Compare October 9, 2025 14:19
- Use probabilit for random variable generation
- Add option 'correlation_iterations' in general input sheet (default=0 => ImanConover)
- Since variable sampling is not done in the same order, RNG is different and snapshot had to be used
- Slight discrepancies in Mac and Linux RNG. Fixed by letting snapshot compare 6 siginificant digits
- Added a test file with 6 lognorms, that showcases how we get better correlation matrices if correlation_iterations > 0
- Deleted ImanConover, nearest_correlation_matrix, etc. These are all in probabilit
@dafeda
dafeda merged commit e0461ae into equinor:main Oct 10, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants